Skip to content

feat(react-menu): expose base hooks and types for Menu item components#35900

Draft
dmytrokirpa wants to merge 2 commits intomicrosoft:masterfrom
dmytrokirpa:feat/react-menu-expose-base-hooks
Draft

feat(react-menu): expose base hooks and types for Menu item components#35900
dmytrokirpa wants to merge 2 commits intomicrosoft:masterfrom
dmytrokirpa:feat/react-menu-expose-base-hooks

Conversation

@dmytrokirpa
Copy link
Copy Markdown
Contributor

Summary

  • Exports useMenuItemBase_unstable from @fluentui/react-menu public index
  • Exports useMenuItemCheckboxBase_unstable from @fluentui/react-menu public index
  • Exports useMenuItemRadioBase_unstable, MenuItemRadioBaseProps, and MenuItemRadioBaseState from @fluentui/react-menu public index
  • Exports useMenuItemSwitchBase_unstable from @fluentui/react-menu public index
  • Also adds MenuItemRadioBaseProps and MenuItemRadioBaseState re-exports to the MenuItemRadio.ts barrel (required to surface the types through the package index)

All four base hooks were already implemented in the component source files (added in PR #35660) but gated behind comments in index.ts.

Note: useMenuItemBase_unstable, useMenuItemCheckboxBase_unstable, and useMenuItemSwitchBase_unstable use the same props/state types as their styled counterparts — no separate BaseProps/BaseState types are needed for those three.

Tracking: #35562

🤖 Generated with Claude Code

@github-actions
Copy link
Copy Markdown

github-actions bot commented Mar 25, 2026

📊 Bundle size report

✅ No changes found

@github-actions
Copy link
Copy Markdown

Pull request demo site: URL

@@ -0,0 +1,7 @@
{
Copy link
Copy Markdown

@github-actions github-actions bot Mar 25, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🕵🏾‍♀️ visual changes to review in the Visual Change Report

vr-tests-react-components/Avatar Converged 1 screenshots
Image Name Diff(in Pixels) Image Type
vr-tests-react-components/Avatar Converged.badgeMask - RTL.normal.chromium.png 6 Changed
vr-tests-react-components/CalendarCompat 4 screenshots
Image Name Diff(in Pixels) Image Type
vr-tests-react-components/CalendarCompat.multiDayView - High Contrast.default.chromium.png 3349 Changed
vr-tests-react-components/CalendarCompat.multiDayView.default.chromium_1.png 849 Changed
vr-tests-react-components/CalendarCompat.multiDayView - Dark Mode.default.chromium.png 3308 Changed
vr-tests-react-components/CalendarCompat.multiDayView.default.chromium.png 858 Changed
vr-tests-react-components/Charts-DonutChart 1 screenshots
Image Name Diff(in Pixels) Image Type
vr-tests-react-components/Charts-DonutChart.Dynamic - Dark Mode.default.chromium.png 7530 Changed
vr-tests-react-components/Menu Converged - submenuIndicator slotted content 2 screenshots
Image Name Diff(in Pixels) Image Type
vr-tests-react-components/Menu Converged - submenuIndicator slotted content.default - RTL.submenus open.chromium.png 404 Changed
vr-tests-react-components/Menu Converged - submenuIndicator slotted content.default.submenus open.chromium.png 413 Changed
vr-tests-react-components/Positioning 2 screenshots
Image Name Diff(in Pixels) Image Type
vr-tests-react-components/Positioning.Positioning end.chromium.png 504 Changed
vr-tests-react-components/Positioning.Positioning end.updated 2 times.chromium.png 140 Changed
vr-tests-react-components/ProgressBar converged 2 screenshots
Image Name Diff(in Pixels) Image Type
vr-tests-react-components/ProgressBar converged.Indeterminate + thickness - High Contrast.default.chromium.png 51 Changed
vr-tests-react-components/ProgressBar converged.Indeterminate + thickness.default.chromium.png 26 Changed
vr-tests-react-components/TagPicker 2 screenshots
Image Name Diff(in Pixels) Image Type
vr-tests-react-components/TagPicker.disabled - RTL.disabled input hover.chromium.png 635 Changed
vr-tests-react-components/TagPicker.disabled - High Contrast.disabled input hover.chromium.png 1319 Changed

There were 3 duplicate changes discarded. Check the build logs for more information.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant